<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>线条</title>
    <style>
       /*  html{
            background-color: black;
        } */
        .box{
            width: 300px;
            height: 100px;
            background-color: aqua;
            margin: 250px auto;
            overflow: hidden;
            position: relative;
            /* text-shadow: 2px 2px 2px black; */
            /* text-align: center;
            line-height: 100px; */
        }
        .box1{
            width: 0px;
            height: 2px;
            background-color: red;
            transition: width 1s;
            position: absolute;
            top: 30px;
        }
        .box:hover .box1,
        .box:hover .box2{
            width: 300px;
        }
        .box2{
            width: 0px;
            height: 2px;
            background-color: red;
            transition: width 1s 0.5s;
            position: absolute;
            top: 70px;
        }
        .box3{
            width: 3px;
            height: 0px;
            background-color: red;
            position: absolute;
            left: 50px;
            transition: height 1s 1s;
        }
        .box:hover .box3,
        .box:hover .box4{
            height: 100px;
        }
        .box4{
            width: 2px;
            height: 0px;
            background-color: red;
            position: absolute;
            right: 50px;
            transition: height 1s 2s;
        }
    </style>
</head>
<body>
    <div class="box">
        111111111111111111111
        <div class="box1"></div>
        <div class="box2"></div>
        <div class="box3"></div>
        <div class="box4"></div>
    </div>
</body>
</html>